//
//  SelectLevelScene.m
//  MinusTheBox
//
//  Created by Chi Ho Chiu on 30/4/12.
//  Copyright 2012 Individual. All rights reserved.
//

#import "SelectLevelScene.h"


@implementation SelectLevelScene
@synthesize layer;


-(void) dealloc
{
	[layer release];
	[super dealloc];
}

-(id) init
{
	if (self = [super init])
	{
		//Init Layer
		self.layer = [SelectLevelLayer node];
		layer.delegate = self;
		
		[self addChild:layer];
	}
	
	return self;
}

-(NSUInteger) getTotalLevel
{	
	//Get whole pList
	NSString *pListPath = [[NSBundle mainBundle] pathForResource:@"level" ofType:@"plist"];
	NSDictionary *pListDict = [NSDictionary dictionaryWithContentsOfFile:pListPath];
	
	//Get total number of stage
	return [pListDict count];
}

@end
